<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <h1>邮件发送</h1>
    <div>
        <label for="">邮箱：</label>
        <input type="text" id="email">
    </div>
    <div>
        <textarea rows="10" placeholder="内容" id="content"></textarea>
    </div>
    <button>发送</button>
</body>
<script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
<script>
    $("button").click(()=>{
        // 获取要发送的邮箱
        let email = $("#email").val();
        // 获取内容
        let content = $("#content").val();
        if(!email || !content){
            alert("请您补充完整信息")
            return
        }
        $.ajax({
            url:"/send/email",
            method:"get",
            data:{
                email,
                content
            },
            success(res){
                console.log(res)
            }
        })
    })
</script>
</html>